import request from '@/utils/request';

// 提交管线数据的新接口
export interface SubmitPipeDataRequest {
  pipeInfo: {
    gj?: number;
    gl?: number;
    jklx?: string;
    gc?: string;
    gdwz?: string;
    gdyl?: string;
    gdsd?: number;
    gdsj?: string;
    dz?: string[];
    dzsl?: number;
    sgph?: string;
    qw?: number;
    qx?: string[];
    zrzh?: string;
    zxjcsj?: string;
    xjpl?: string;
    jcyj?: string;
    xljl?: string;
    wxjl?: string;
  };
  pipeGeometry: {
    points: Array<{
      longitude: number;
      latitude: number;
      height?: number;
    }>;
    id?: string;
  };
}

// 提交管线数据
export function submitPipeData(data: SubmitPipeDataRequest) {
  return request({
    url: '/pipe/gis/pipelineCenterCircleData',
    method: 'post',
    data,
    timeout: 10000000
  });
}
